Eclipse Platform
Pre-release 3.0

org.eclipse.jface.text.source
Class AnnotationModelEvent

java.lang.Object
  extended byorg.eclipse.jface.text.source.AnnotationModelEvent

public class AnnotationModelEvent
extends Object

Specification of changes applied to annotation models. The event carries the changed annotation model as well as added, removed, and modified annotations.

Since:
2.0
See Also:
IAnnotationModel

Constructor Summary
AnnotationModelEvent(IAnnotationModel model)
          Creates a new annotation model event for the given model.
AnnotationModelEvent(IAnnotationModel model, boolean isWorldChange)
          Creates a new annotation model event for the given model.
 
Method Summary
 void annotationAdded(Annotation annotation)
          Adds the given annotation to the set of annotations that are reported as being added from the model.
 void annotationChanged(Annotation annotation)
          Adds the given annotation to the set of annotations that are reported as being changed from the model.
 void annotationRemoved(Annotation annotation)
          Adds the given annotation to the set of annotations that are reported as being removed from the model.
 Annotation[] getAddedAnnotations()
          Returns the added annotations.
 IAnnotationModel getAnnotationModel()
          Returns the model this event refers to.
 Annotation[] getChangedAnnotations()
          Returns the changed annotations.
 Annotation[] getRemovedAnnotations()
          Returns the removed annotations.
 boolean isEmpty()
          Returns whether this annotation model event is empty or not.
 boolean isWorldChange()
          Returns whether this annotation model events contains detailed information about the modifications applied to the event annotation model or whether it represents a world change, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationModelEvent

public AnnotationModelEvent(IAnnotationModel model)
Creates a new annotation model event for the given model.

Parameters:
model - the model

AnnotationModelEvent

public AnnotationModelEvent(IAnnotationModel model,
                            boolean isWorldChange)
Creates a new annotation model event for the given model.

Parameters:
model - the model
isWorldChange - true if world change
Since:
3.0
Method Detail

getAnnotationModel

public IAnnotationModel getAnnotationModel()
Returns the model this event refers to.

Returns:
the model this events belongs to

annotationAdded

public void annotationAdded(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being added from the model. If this event is considered a world change, it is no longer so after this method has successfully finished.

Parameters:
annotation - the added annotation
Since:
3.0

getAddedAnnotations

public Annotation[] getAddedAnnotations()
Returns the added annotations.

Returns:
the added annotations
Since:
3.0

annotationRemoved

public void annotationRemoved(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being removed from the model. If this event is considered a world change, it is no longer so after this method has successfully finished.

Parameters:
annotation - the removed annotation
Since:
3.0

getRemovedAnnotations

public Annotation[] getRemovedAnnotations()
Returns the removed annotations.

Returns:
the removed annotations
Since:
3.0

annotationChanged

public void annotationChanged(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being changed from the model. If this event is considered a world change, it is no longer so after this method has successfully finished.

Parameters:
annotation - the changed annotation
Since:
3.0

getChangedAnnotations

public Annotation[] getChangedAnnotations()
Returns the changed annotations.

Returns:
the changed annotations
Since:
3.0

isEmpty

public boolean isEmpty()
Returns whether this annotation model event is empty or not. If this event represents a world change, this method returns false although the event does not carry any added, removed, or changed annotations.

Returns:
true if this event is empty
Since:
3.0

isWorldChange

public boolean isWorldChange()
Returns whether this annotation model events contains detailed information about the modifications applied to the event annotation model or whether it represents a world change, i.e. everything in the model might have changed.

Returns:
true if world change, false otherwise

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.